package 蓝桥第二期2024;
public class 花费增值 {
    public static void main(String[] args) {
        int money =8;//到12
        int sum = 12;
        for (int i = 0;i<7 ; i++) {
            sum = sum *2;
            money = money+10;
            if (sum>=2024){
                break;
            }
        }
        System.out.println(sum);
        System.out.println(sum-2024);
        System.out.println(money);
        for (int i = 0; i<146; i++) {
            int get = sum %10;
            if (get == 1 || get == 2){
                sum += 1;
                money +=1;
            }
            else {
                sum += get;
                money += 3;
            }
            if (sum>=2024){
                break;
            }
        }
        System.out.println(sum);
        System.out.println(money);
    }
}
